import request from '@/utils/request'

// 查询收益管理列表
export function listStatement(query) {
  return request({
    url: '/system/statement/list',
    method: 'get',
    params: query
  })
}

// 查询收益管理详细
export function getStatement(id) {
  return request({
    url: '/system/statement/' + id,
    method: 'get'
  })
}

// 新增收益管理
export function addStatement(data) {
  return request({
    url: '/system/statement',
    method: 'post',
    data: data
  })
}

// 修改收益管理
export function updateStatement(data) {
  return request({
    url: '/system/statement',
    method: 'put',
    data: data
  })
}


// 删除收益管理
export function delStatement(id) {
  return request({
    url: '/system/statement/' + id,
    method: 'delete'
  })
}

// 获得子用户
export function getUserList() {
  return request({
    url: '/system/statement/getUserList',
    method: 'get'
  })
}// 获得子用户
export function getPermission() {
  return request({
    url: '/system/statement/getPermission',
    method: 'get'
  })
}

export function setRatio(ratio) {
  return request({
    url: '/system/statement/setRatio?ratio='+ratio,
    method: 'get',
  })
}

export function getRatio(ratio) {
  return request({
    url: '/system/statement/getRatio',
    method: 'get',
  })
}

export function getRowRatio(id) {
  return request({
    url: '/system/statement/getRowRatio?id='+id,
    method: 'get',
  })
}
// 新增收益管理
export function setRowRatio(data) {
  return request({
    url: '/system/statement/setRowRatio',
    method: 'post',
    data: data
  })
}
